import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;

public class UDPDemo6{
	public static void main(String[] args) throws IOException {
		DatagramSocket socket = new DatagramSocket(8889);
    	byte buff[] = new byte[100];
    	DatagramPacket packet = new DatagramPacket(buff, buff.length);
    	socket.receive(packet);
    	System.out.println(new String(buff,0,packet.getLength()));
    	socket.close();
	}
}
